﻿using Microsoft.EntityFrameworkCore;
using Abp.Zero.EntityFrameworkCore;
using SportsPlatform.Authorization.Roles;
using SportsPlatform.Authorization.Users;
using SportsPlatform.MultiTenancy;
using SportsPlatform.Model.PermissionManagement;
using SportsPlatform.Model.SportBusiness;
using System.ComponentModel.DataAnnotations.Schema;
using SportsPlatform.Core.Model.SportBusiness;

namespace SportsPlatform.EntityFrameworkCore
{
    public class SportsPlatformDbContext : AbpZeroDbContext<Tenant, Role, User, SportsPlatformDbContext>
    {
        /* Define a DbSet for each entity of the application */
        /// <summary>
        /// 客户信息表
        /// </summary>
        public DbSet<CompanyInfo> CompanyInfo { get; set; }

        /// <summary>
        /// 授权信息表
        /// </summary>
        public DbSet<AuthorizationInfo> AuthorizationInfo { get; set; }

        /// <summary>
        /// 客户类型信息表
        /// </summary>
        public DbSet<CompanyTypeInfo> CompanyTypeInfo { get; set; }

        /// <summary>
        /// 部门架构信息表
        /// </summary>
        public DbSet<DepartmentInfo> DepartmentInfo { get; set; }

        /// <summary>
        /// 部门角色对应表
        /// </summary>
        public DbSet<DepartmentRole> DepartmentRole { get; set; }

        /// <summary>
        /// 功能信息表
        /// </summary>
        public DbSet<FunctionInfo> FunctionInfo { get; set; }

        /// <summary>
        /// 功能操作信息表
        /// </summary>
        public DbSet<OperationInfo> OperationInfo { get; set; }

        /// <summary>
        /// 平台信息表
        /// </summary>
        public DbSet<PlatformInfo> PlatformInfo { get; set; }

        /// <summary>
        /// 角色功能操作对应表
        /// </summary>
        public DbSet<RoleFunction> RoleFunction { get; set; }

        /// <summary>
        /// 角色信息表
        /// </summary>
        public DbSet<RoleInfo> RoleInfo { get; set; }

        /// <summary>
        /// 用户信息表
        /// </summary>
        public DbSet<UserInfo> UserInfo { get; set; }

        /// <summary>
        /// 赛事表
        /// </summary>
        public DbSet<Competition> Competition { get; set; }

        /// <summary>
        /// 咨询分类表
        /// </summary>
        public DbSet<Category> Category { get; set; }

        /// <summary>
        /// 赛事项目表
        /// </summary>
        public DbSet<CompetitionProject> CompetitionProject { get; set; }

        /// <summary>
        /// 参赛团队表
        /// </summary>
        public DbSet<CompeteTeam> CompeteTeam { get; set; }

        /// <summary>
        /// 参赛团队人员表
        /// </summary>
        public DbSet<CompeteTeamEmployee> CompeteTeamEmployee { get; set; }

        /// <summary>
        /// 赛事单位表
        /// </summary>
        public DbSet<CompetitionUnit> CompetitionUnit { get; set; }

        /// <summary>
        /// 参赛用户表
        /// </summary>
        public DbSet<Employee> Employee { get; set; }

        /// <summary>
        /// 咨询信息表
        /// </summary>
        public DbSet<Information> Information { get; set; }

        /// <summary>
        /// 报名信息表
        /// </summary>
        public DbSet<RegistrationInfo> RegistrationInfo { get; set; }

        /// <summary>
        /// 团队表
        /// </summary>
        public DbSet<Team> Team { get; set; }

        /// <summary>
        /// 团队用户表
        /// </summary>
        public DbSet<TeamUser> TeamUser { get; set; }

        /// <summary>
        /// 比赛规则信息表
        /// </summary>
        public DbSet<CompetitionRuleInfo> CompetitionRuleInfo { get; set; }

        /// <summary>
        /// 项目表
        /// </summary>
        public DbSet<Project> Project { get; set; }

        /// <summary>
        /// 规则适用项目表
        /// </summary>
        public DbSet<RuleApplyProject> RuleApplyProject { get; set; }

        /// <summary>
        /// 项目类别表
        /// </summary>
        public DbSet<ProjectType> ProjectType { get; set; }

        /// <summary>
        /// 意见反馈表
        /// </summary>
        public DbSet<Feedback> Feedback { get; set; }

        /// <summary>
        /// 比赛赛事成绩表
        /// </summary>
        public DbSet<CompetitionAchievementInfo> CompetitionAchievementInfo { get; set; }

        /// <summary>
        /// 成绩过点记录信息
        /// </summary>
        public DbSet<AchievementOverPointInfo> AchievementOverPointInfo { get; set; }

        /// <summary>
        /// 成绩惩罚记录信息
        /// </summary>
        public DbSet<AchievementPunishmentInfo> AchievementPunishmentInfo { get; set; }

        /// <summary>
        /// 订单
        /// </summary>
        public DbSet<PaymentOrderInfo> PaymentOrderInfo { get; set; }

        /// <summary>
        /// 比赛分组
        /// </summary>
        public DbSet<CompetitionGroupingInfo> CompetitionGroupingInfo { get; set; }
        
        /// <summary>
        /// 比赛分组
        /// </summary>
        public DbSet<GroupingEmployeeInfo> GroupingEmployeeInfo { get; set; }

        /// <summary>
        /// 比赛项目场次信息表
        /// </summary>
        public DbSet<EventsSession> EventsSession { get; set; }


        /// <summary>
        ///订单操作记录
        /// </summary>
        public DbSet<PaymentOrderOperationInfo> PaymentOrderOperationInfo { get; set; }

        /// <summary>
        ///订单操作记录
        /// </summary>
        public DbSet<CategoryNews> CategoryNews { get; set; }

        /// <summary>
        /// 计划任务实体操作记录
        /// </summary>
        public DbSet<SysScheduleJob> ScheduleJobs { get; set; }

        /// <summary>
        /// 审计日志操作记录
        /// </summary>
        public DbSet<SysLog> SysLogs { get; set; }

        /// <summary>
        /// 客户端操作记录日志表
        /// </summary>
        public DbSet<ClientLog> ClientLogs { get; set; }

        public SportsPlatformDbContext(DbContextOptions<SportsPlatformDbContext> options)
            : base(options)
        {
        }
    }
}
